package com.crazymaker.demo.rxJava.defer;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import rx.Observable;
import rx.functions.Func0;


@Slf4j
@Data
public class ValueHolderDefered
{

    private String value;

    public Observable<String> observable()
    {
        return Observable.defer(new Func0<Observable<String>>()
        {
            public Observable<String> call()
            {
                return Observable.just(value);
            }
        });
    }
}
